<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta name="author" content="">
    <title>添加门店</title>
    <% include("../inc/input_css.html"){}%>
    <style>
        label{
            width: 140px!important;
        }
    </style>
    <%
        var isAdd = false;
        var isEdit = false;
        if(isEmpty(thirdPartyAccess.id)){
            isAdd = true;
        }else{
            isEdit = true;
        }
    %>
<body >
<div class="ibox">
    <div class="ibox-title">
        <div class="pull-left mbx navbar_title">
            <span class="current">第三方接入</span>
            <span class="line">/</span>
            <span class="current"><a href="/sys/thirdparty/list">接入方管理</a></span><span class="line">/</span>
            <%if(isAdd){%>添加<%}else{%>编辑<%}%>
        </div>
    </div>
    <div class="ibox-content">
        <div class="wrapper wrapper-content">
            <div class="row">
                <div class="padding-40">
                    <form method="post" action="<%if (isAdd){%>/sys/thirdparty/save<%}else{%>/sys/thirdparty/update<%}%>" class="form-horizontal form-validate">
                        <input type="hidden" name="thirdPartyAccess.id" value="${thirdPartyAccess.id!}"/>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>接入方名称</label>
                            <div class="col-sm-3">
                                <input type="text" name="thirdPartyAccess.name" value="${thirdPartyAccess.name!}" class="form-control light-input" required>
                            </div>

                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>接入商户</label>
                            <div class="col-sm-3">
                                <select name="thirdPartyAccess.shopId" value="" class="form-control light-input" style="height: 31px;padding: 0px 12px" required <%if (isEdit){%> disabled<%}%>>
                                    <option value="">请选择...</option>
                                    <%for(list in companyInfos!){%>
                                    <option value="${list.shopId}"<%if (list.shopId == thirdPartyAccess.shopId!){%> selected<%}%>>${list.brandName}</option>
                                    <%}%>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>APPID</label>
                            <div class="col-sm-3">
                                <input readonly type="text" placeholder="保存时自动生成" name="" value="${thirdPartyAccess.appid!}" class="form-control light-input">
                            </div>

                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>SECRET</label>
                            <div class="col-sm-3">
                                <input readonly type="text" placeholder="保存时自动生成" name="" value="${thirdPartyAccess.secret!}" class="form-control light-input">
                            </div>

                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">接入状态${thirdPartyAccess.status!}</label>
                            <div class="col-sm-4 col-md-3  col-lg-2 ">
                                <div class="right_cont_r radio i-checks">
                                    <%if(isAdd){%>
                                    <input type="radio" value="1"  name="thirdPartyAccess.status" checked><span style="margin-right: 15px;">开启</span>
                                    <%}else{%>
                                    <input type="radio" value="1"  name="thirdPartyAccess.status" <%if (thirdPartyAccess.status! == '1'){%> checked<%}%>><span style="margin-right: 15px;">开启</span>
                                    <%}%>

                                    <input type="radio" value="0"  name="thirdPartyAccess.status" <%if (thirdPartyAccess.status! == '0'){%> checked<%}%>><span>关闭</span>
                                </div>
                            </div>

                        </div>

                        <div class="form-group" style="margin-top: 24px">
                            <label class="col-sm-2 control-label "></label>
                            <div class="col-sm-4 col-sm-offset-0">
                                <button class="hive-btn-cancle" id="btn_cancle" type="button" onclick="history.back()">&nbsp;取消&nbsp;</button>
                                <button class="hive-btn hive-btn-primary margin-left-8" type="submit">&nbsp;提交&nbsp;
                                </button>
                            </div>
                        </div>

                    </form>


                </div>
            </div>
        </div>
    </div>
</div>

<% include("../inc/input_js.html"){}%>
<script type="text/javascript">
    $(function () {
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_flat-blue',
            radioClass: 'iradio_flat-blue',
        });

    })
</script>

</body>

</html>